-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
@@ -846,28 +856,28 @@ def try_backfill(domains): | |||
states = dict(zip(event_ids, [s.state for s in states])) | |||
|
|||
state_map = yield self.store.get_events( | |||
[e_id for ids in states.values() for e_id in ids], | |||
[e_id for ids in states.itervalues() for e_id in ids.itervalues()], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this changing from for e_id in ids
to for e_id in ids.itervalues()
?
assuming you've just unpicked what states
is in here, could you add some comments about it? I really shouldn't have to go and spelunk in resolve_state_groups_for_events
for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added a comment and typing info
likely_domains = get_domains_from_state(states[e_id]) | ||
|
||
success = yield try_backfill([ | ||
dom for dom in likely_domains | ||
dom for dom, _ in likely_domains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks bogus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_domains_from_state
returns a list[tuple[str, int]]
generally I'm a bit confused about what's a random |
8cb470d
to
e85b5a0
Compare
Yeah, sorry. I've split up the commits to make things clearer about what is what. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm anyway. Although that stuff with states
where it changes type every line is horrible.
@@ -843,7 +843,7 @@ def try_backfill(domains): | |||
tried_domains = set(likely_domains) | |||
tried_domains.add(self.server_name) | |||
|
|||
event_ids = list(extremities.keys()) | |||
event_ids = list(extremities.iterkeys()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this the same as list(extremities)
? Happy for this to be explicit but it's the opposite to what you've done at line 800
Changes in synapse v0.31.0 (2018-06-06) ====================================== Most notable change from v0.30.0 is to switch to python prometheus library to improve system stats reporting. WARNING this changes a number of prometheus metrics in a backwards-incompatible manner. For more details, see `docs/metrics-howto.rst <docs/metrics-howto.rst#removal-of-deprecated-metrics--time-based-counters-becoming-histograms-in-0310>`_. Bug Fixes: * Fix metric documentation tables (PR #3341) * Fix LaterGuage error handling (694968f) * Fix replication metrics (b7e7fd2) Changes in synapse v0.31.0-rc1 (2018-06-04) ========================================== Features: * Switch to the Python Prometheus library (PR #3256, #3274) * Let users leave the server notice room after joining (PR #3287) Changes: * daily user type phone home stats (PR #3264) * Use iter* methods for _filter_events_for_server (PR #3267) * Docs on consent bits (PR #3268) * Remove users from user directory on deactivate (PR #3277) * Avoid sending consent notice to guest users (PR #3288) * disable CPUMetrics if no /proc/self/stat (PR #3299) * Add local and loopback IPv6 addresses to url_preview_ip_range_blacklist (PR #3312) Thanks to @thegcat! * Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (PR #3307) * Add private IPv6 addresses to example config for url preview blacklist (PR #3317) Thanks to @thegcat! * Reduce stuck read-receipts: ignore depth when updating (PR #3318) * Put python's logs into Trial when running unit tests (PR #3319) Changes, python 3 migration: * Replace some more comparisons with six (PR #3243) Thanks to @NotAFile! * replace some iteritems with six (PR #3244) Thanks to @NotAFile! * Add batch_iter to utils (PR #3245) Thanks to @NotAFile! * use repr, not str (PR #3246) Thanks to @NotAFile! * Misc Python3 fixes (PR #3247) Thanks to @NotAFile! * Py3 storage/_base.py (PR #3278) Thanks to @NotAFile! * more six iteritems (PR #3279) Thanks to @NotAFile! * More Misc. py3 fixes (PR #3280) Thanks to @NotAFile! * remaining isintance fixes (PR #3281) Thanks to @NotAFile! * py3-ize state.py (PR #3283) Thanks to @NotAFile! * extend tox testing for py3 to avoid regressions (PR #3302) Thanks to @krombel! * use memoryview in py3 (PR #3303) Thanks to @NotAFile! Bugs: * Fix federation backfill bugs (PR #3261) * federation: fix LaterGauge usage (PR #3328) Thanks to @intelfx!
These only get hit when failed to backfill from servers currently in the
room.
Also includes changes to use
iter*
methods.